<div class="top-size-lg has-footer">
    <div class="statusbtn container">
        <div class="btn-group" ng-init="status = 'all'">
            <button type="button" class="btn btn-sm" ng-class="status != 'all'?'sigactive':'sigunActive'"
                    ng-click="btnMode('followed')">已关注
            </button>
            <button type="button" class="btn btn-sm" ng-class="status == 'all'?'sigactive':'sigunActive'"
                    ng-click="btnMode('all')">全部
            </button>
        </div>
    </div>

    <div class="msgslist">
        <!--<div>显示更多</div>-->
        <!--<p ng-if="msgs.length<=0" style="color:red;text-align: center;margin-top:20px;">-->
        <!--<span><i class="iconfont icon-ku"></i></span>-->
        <!--<span>暂无信号数据！</span>-->
        <!--</p>-->
        <div style="border-bottom: 1px solid #908d8d;" ng-repeat="msg in msgs">
            <div style="padding: 5px 0;" ng-class="msg.read==false?'bg-666':''">
                <div class="col-xs-2">
                    <!--<img ng-src="images/icon/{{msg.fromUserPic}}" alt="" width="24" height="24">-->
                    <span>
                        <i style="font-weight: 700" ng-if="msg.fromId == -1" class="iconfont icon-tongzhi1"></i>
                        <i ng-if="msg.fromId == -4" class="iconfont icon-transaction"></i>
                    </span>
                </div>
                <div class="col-xs-10" style="padding-left: 0;">
                    <div class="col-xs-4" style="padding: 0;font-size: 15px;">{{msg.fromUserName}}</div>
                    <div class="col-xs-8 text-right" style="padding: 0;font-size: 12px;">{{msg.time | myDate}}</div>
                    <div style="clear: both;"></div>
                    <div ng-if="msg._instrument != '' && msg._instrument != null" style="display: inline-block">
                        <div style="display: inline-block;" ui-sref="app.rates.analysis({ instrument: msg._instrument.name })">
                            <span style="padding-right: 5px;">{{ msg._instrument.name }}</span>
                            <span>(</span>
                            <div style="display:inline-block;width: 24px;height: 12px;text-align: center;">
                                <img ng-src="images/flags/{{ msg._instrument.prefixIcon }}" alt=""
                                     style="max-width: 24px; max-height: 24px;">
                            </div>
                            <span>/</span>
                            <div style="display:inline-block;width: 24px;height: 12px;text-align: center;">
                                <img ng-src="images/flags/{{ msg._instrument.suffixIcon }}" alt=""
                                     style="max-width: 24px; max-height: 24px;">
                            </div>
                            <span>)</span>
                        </div>
                        <span style="cursor: pointer;" ng-click="openSignalModal(msg)">(K线)</span>
                    </div>
                    <div style="font-size: 1.2rem;word-wrap : break-word;">
                        {{msg.cnContent}}
                    </div>
                </div>
                <div style="clear: both;"></div>
            </div>
        </div>
        <div style="width: 100%;height: 80px; line-height: 80px; text-align: center;">
            <div ng-if="user.isRegistered" type="button" class="btn btn-danger" data-toggle="modal"
                 data-target="#clearMsgs" style="width:200px;margin:0 auto 5px;">清除全部信号
            </div>
            <!--deleteMsgs modal-->
            <div class="modal fade clearMsgs" id="clearMsgs" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                <div class="modal-dialog modal-sm" role="document">
                    <div class="modal-content">
                        <div class="modal-body" style="color: #000;text-align: center;padding: 10px;font-size: 16px;">
                            确定清除全部信号吗？
                        </div>
                        <div class="modal-footer" style="padding: 4px;text-align: center;line-height: 55px;">
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <button type="button" class="btn btn-danger" ng-click="clearMsgs()">清除</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/ng-template" id="signalModal.html">
    <div class="text-black">
        <div class="modal-header">
            <h4>
                <span>{{data.instrument}}</span>
                <button type="button" class="close" ng-click="close()">
                    <i class="glyphicon glyphicon-remove-circle text-black" aria-hidden="true"></i>
                </button>
            </h4>
            <div>{{data.cnContent}}</div>
        </div>
        <div class="modal-body">
            <div id="main" style="width:100%;height:400px;border:1px solid #ccc;"></div>
        </div>
    </div>
</script>
